package com.xiguaji.tiktok.v1.ins.favorite.repository;

import com.xiguaji.tiktok.v1.ins.favorite.model.InsFavorite;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface InsFavoriteRepository extends CrudRepository<InsFavorite,Integer>,InsFavoriteExtRepository {

    InsFavorite findByTypeAndTargetIdAndUserId(int type,long targetId,int userId);

    int countByTypeAndUserId(int type,int userId);

    void deleteById(int id);
}
